package com.lesso.lll.sunflower.employee.service;



import com.baomidou.mybatisplus.service.IService;
import com.lesso.lll.sunflower.employee.entity.Employee;

import java.util.List;

/**
 * 员工服务接口
 */
public interface EmployeeService extends IService<Employee> {
    /**
     * 新增员工
     * @param employee 员工信息
     * @return 员工ID
     */
    Long addEmployee(Employee employee);

    /**
     * 修改员工信息
     * @param employee 员工信息
     * @return 是否成功
     */
    boolean updateEmployee(Employee employee);

    /**
     * 员工离职
     * @param employeeId 员工ID
     * @return 是否成功
     */
    boolean resignEmployee(Long employeeId);

    /**
     * 绑定考勤设备
     * @param employeeId 员工ID
     * @param deviceIds 设备ID列表
     * @return 是否成功
     */
    boolean bindAttendanceDevices(Long employeeId, List<Long> deviceIds);

    /**
     * 绑定考勤规则
     * @param employeeId 员工ID
     * @param ruleId 规则ID
     * @param effectiveDate 生效日期
     * @return 是否成功
     */
    boolean bindAttendanceRule(Long employeeId, Long ruleId, String effectiveDate);

    /**
     * 验证设备是否允许该员工打卡
     * @param employeeId 员工ID
     * @param deviceId 设备ID
     * @return 是否允许
     */
    boolean isDeviceAllowed(Long employeeId, Long deviceId);
}    